import java.io.*;
import java.util.ArrayList;
import java.util.List;

public class main {
    static File fi = new File("../data");
    static BufferedReader bfr;
    final static int N = 9999;
    static List<Integer> ar = new ArrayList<Integer>();

    public static void main(String argc[]) throws IOException {
        bfr = new BufferedReader(new FileReader(fi));
        String ts = null;
        for (int i = 0; i < N; i++) {
            ts = bfr.readLine();
            ar.add(Integer.parseInt(ts));
        }
        bfr.close();
        System.out.println("Read finish");
        long st = System.currentTimeMillis();

        for (int i = 0; i < N - 1; i++) {
            for (int j = 0; j < N - i - 1; j++) {
                if (ar.get(j) > ar.get(j + 1)) {
                    int tm = ar.get(j);
                    ar.set(j, ar.get(j + 1));
                    ar.set(j + 1, tm);
                }
            }
        }

        long et = System.currentTimeMillis();
        System.out.println(ar);
        System.out.println("Time: " + (et - st) + "ms");
    }
}
